#pragma once

#include "ftd2xx.h"

class ftd232
{

FT_HANDLE ftHandle;

DWORD EventMask; 

DWORD EventDWord; 
DWORD TxBytes; 
DWORD RxBytes; 
DWORD BytesReceived; 
DWORD BytesSend; 
DWORD lpdwAmountInRxQueue;
DWORD lpdwAmountInTxQueue; 
DWORD lpdwEventStatus;

public:
HANDLE hEvent; 
char RxBuffer[3000]; 
char TxBuffer[3000]; 
FT_STATUS ftStatus;
bool ft_box_connected;

	ftd232(void);
	~ftd232(void);

int ft_init(void);
long GetBuffer(void);
float getTemp(unsigned char c);
float command(unsigned char comm, unsigned char addr);

// Purge Buffer
int Purge(void);
int ftd232::Send(unsigned char command, unsigned char adress, unsigned char par);
bool not_response(void);
};
